
export var ObstacleType = {
    Empty: 1,
    Single: 2,
    Mul: 3
}

export var SpecifyColor = {
    any: -2,
    null: -1,
    redBook: 1,
    yellowCrown: 2,
    greenLeaf: 3,
    blueShield: 4,
    purpleGem: 5
}

export var LayerType = {
    Lowest: 1,
    Middle: 2,
    Top: 3
}

export var ObstacleAllType = {
    Empty: -1,
    WoodenBox: 1,
    ColorBox: 2,
    Grass: 3,
    GrassLand: 4,
    Egg: 5,
    ColorBottle: 6,
    Vase: 7,
    Honey: 8,
    Icicle: 9,
    curtain: 10,
    Oyster: 11,
    Flowerpot: 12,
    Stone: 13,
    SafeBox: 14,
    PorcelainPig: 15,
    cupboard: 16,
    MagicHat: 17,
    MailBox: 18,
    Bird: 19,
    GoldCoin: 20,
    PurpleFlower: 21,
    OneBottle: 22,
    Pearl: 23,
    oneCupboardPlate: 24,
    Candlebox: 25,
    BirdNest: 26,
    CupHolder: 27,
    Rock: 28,
    DrillFill: 29
}

export var ObstacleTargetName = {
    Null: "Null",
    WoodenBox: "WoodenBox_1",
    ColorBox: "ColorBox-color_box_goal",
    Grass: "Grass_1",
    GrassLand: "GrassLand_5",
    Egg: "Egg_1",
    ColorBottle: "ColorBottle_Item_7",
    Vase: "Vase_2",
    Honey: "Honey_1",
    Icicle: "Icicle_one",
    curtain: "curtain_item_1",
    Pearl: "Pearl",
    Oyster: "Oyster_1",
    Flowerpot: "Flowerpot_1",
    Stone: "Stone_1",
    SafeBox: "SafeBox_5",
    PorcelainPig: "PorcelainPig_1",
    cupboard: "cupboard_close",
    cupboardPlate: "cupboard_item",
    Gem: "gem",
    Mail: "Mail",
    Bird: "Bird_1",
    GoldCoin: "GoldCoin_1",
    PurpleFlower: "PurpleFlower_1",
    Plate: "cupboard_item",
    Candlebox: "Candlebox",
    BirdNest: "BirdNest",
    CupHolder: "CupHolder",
    Rock: "Rock",
    DrillFill: "DrillFill"
}

// public ObstacleType  = {
//     Singgle:1,
//     Double:2,
//     Multi:3
// }

export var ObstacleAllType1 = {
    WBX: "WoodenBox",
    CBX: "ColorBox",
    GRA: "Grass",
    GLD: "GrassLand",
    EGG: "Egg",
    CBO: "ColorBottle",
    VAS: "Vase",
    HOY: "Honey",
    ICI: "Icicle",
    CUR: "curtain",
    OYS: "Oyster",
    FLP: "Flowerpot",
    STO: "Stone",
    SAF: "SafeBox",
    PPG: "PorcelainPig",
    CBD: "cupboard",
    MHT: "MagicHat",
    MAI: "MailBox",
    BID: "Bird",
    GCN: "GoldCoin",
    PFL: "PurpleFlower",
    OBO: "Bottle",
    CDE: "candlebox",
    BNT: "BirdNest",
    CHD: "CupHolder",
    RCK: "Rock",
    DRI: "DrillFill"
};

const { ccclass, property } = cc._decorator;
@ccclass
export default class ObstacleConfig {

    public static getObstacleInfoByType(type: any): any {
        var a = null;
        Number(type) == ObstacleAllType.WoodenBox ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.WoodenBox,
            name: ObstacleAllType1.WBX,
            aroundMatch: true,
            canMove: false,
            isMul: false,
            useFixedTarget: true
        } : Number(type) == ObstacleAllType.ColorBox ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.ColorBox,
            name: ObstacleAllType1.CBX,
            aroundMatch: true,
            canMove: false,
            isMul: false,
            useFixedTarget: true
        } : Number(type) == ObstacleAllType.Grass ? a = {
            LayoutType: LayerType.Lowest,
            ObstacleAllType: ObstacleAllType.Grass,
            name: ObstacleAllType1.GRA,
            aroundMatch: false,
            canMove: false,
            isMul: false,
            useFixedTarget: false
        } : Number(type) == ObstacleAllType.Egg ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.Egg,
            name: ObstacleAllType1.EGG,
            aroundMatch: true,
            canMove: true,
            isMul: false,
            useFixedTarget: true
        } : Number(type) == ObstacleAllType.Vase ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.Vase,
            name: ObstacleAllType1.VAS,
            aroundMatch: true,
            canMove: true,
            isMul: false,
            useFixedTarget: true
        } : Number(type) == ObstacleAllType.Honey ? a = {
            LayoutType: LayerType.Top,
            ObstacleAllType: ObstacleAllType.Honey,
            name: ObstacleAllType1.HOY,
            aroundMatch: true,
            canMove: false,
            isMul: false,
            useFixedTarget: true
        } : Number(type) == ObstacleAllType.Oyster ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.Oyster,
            name: ObstacleAllType1.OYS,
            aroundMatch: true,
            canMove: true,
            isMul: false,
            useFixedTarget: true
        } : Number(type) == ObstacleAllType.Pearl ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.Oyster,
            name: ObstacleAllType1.OYS,
            aroundMatch: true,
            canMove: true,
            isMul: false,
            useFixedTarget: true
        } : Number(type) == ObstacleAllType.Flowerpot ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.Flowerpot,
            name: ObstacleAllType1.FLP,
            aroundMatch: true,
            canMove: true,
            isMul: false,
            useFixedTarget: true
        } : Number(type) == ObstacleAllType.Stone ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.Stone,
            name: ObstacleAllType1.STO,
            aroundMatch: false,
            canMove: false,
            isMul: false,
            useFixedTarget: true
        } : Number(type) == ObstacleAllType.PorcelainPig ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.PorcelainPig,
            name: ObstacleAllType1.PPG,
            aroundMatch: false,
            canMove: true,
            isMul: false,
            useFixedTarget: true
        } : Number(type) == ObstacleAllType.MailBox ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.MailBox,
            name: ObstacleAllType1.MAI,
            aroundMatch: true,
            canMove: false,
            isMul: false,
            useFixedTarget: true
        } : Number(type) == ObstacleAllType.Bird ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.Bird,
            name: ObstacleAllType1.BID,
            aroundMatch: false,
            canMove: true,
            isMul: false,
            useFixedTarget: true
        } : Number(type) == ObstacleAllType.GoldCoin ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.GoldCoin,
            name: ObstacleAllType1.GCN,
            aroundMatch: true,
            canMove: true,
            isMul: false,
            useFixedTarget: true
        } : Number(type) == ObstacleAllType.PurpleFlower ? a = {
            LayoutType: LayerType.Lowest,
            ObstacleAllType: ObstacleAllType.PurpleFlower,
            name: ObstacleAllType1.PFL,
            aroundMatch: false,
            canMove: false,
            isMul: false,
            useFixedTarget: false
        } : Number(type) == ObstacleAllType.MagicHat ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.MagicHat,
            name: ObstacleAllType1.MHT,
            aroundMatch: true,
            canMove: false,
            isMul: false,
            useFixedTarget: true
        } : Number(type) == ObstacleAllType.Rock ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.Rock,
            name: ObstacleAllType1.RCK,
            aroundMatch: true,
            canMove: true,
            isMul: false,
            useFixedTarget: true
        } : Number(type) == ObstacleAllType.GrassLand ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.GrassLand,
            name: ObstacleAllType1.GLD,
            aroundMatch: true,
            canMove: false,
            isMul: true,
            useFixedTarget: true
        } : Number(type) == ObstacleAllType.ColorBottle ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.ColorBottle,
            name: ObstacleAllType1.CBO,
            aroundMatch: true,
            canMove: false,
            isMul: true,
            useFixedTarget: false
        } : Number(type) == ObstacleAllType.SafeBox ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.SafeBox,
            name: ObstacleAllType1.SAF,
            aroundMatch: false,
            canMove: false,
            isMul: true,
            useFixedTarget: true
        } : Number(type) == ObstacleAllType.cupboard ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.cupboard,
            name: ObstacleAllType1.CBD,
            aroundMatch: true,
            canMove: false,
            isMul: true,
            useFixedTarget: false
        } : Number(type) == ObstacleAllType.Candlebox ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.Candlebox,
            name: ObstacleAllType1.CDE,
            aroundMatch: true,
            canMove: false,
            isMul: true,
            useFixedTarget: false
        } : Number(type) == ObstacleAllType.BirdNest ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.BirdNest,
            name: ObstacleAllType1.BNT,
            aroundMatch: true,
            canMove: false,
            isMul: true,
            useFixedTarget: true
        } : Number(type) == ObstacleAllType.DrillFill ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.DrillFill,
            name: ObstacleAllType1.DRI,
            aroundMatch: false,
            canMove: false,
            isMul: true,
            useFixedTarget: false
        } : Number(type) == ObstacleAllType.Icicle ? a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.Icicle,
            name: ObstacleAllType1.ICI,
            aroundMatch: true,
            canMove: false,
            isMul: true,
            useFixedTarget: true
        } : Number(type) == ObstacleAllType.curtain ? a = {
            LayoutType: LayerType.Top,
            ObstacleAllType: ObstacleAllType.curtain,
            name: ObstacleAllType1.CUR,
            aroundMatch: true,
            canMove: false,
            isMul: true,
            useFixedTarget: true
        } : Number(type) == ObstacleAllType.CupHolder && (a = {
            LayoutType: LayerType.Middle,
            ObstacleAllType: ObstacleAllType.CupHolder,
            name: ObstacleAllType1.CHD,
            aroundMatch: true,
            canMove: false,
            isMul: true,
            useFixedTarget: false
        });
        if (a) return a;
        console.error("找不到障碍物类型", type);
    }
}

